package com.java.demo.model;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class Users {

    @Bean("user1")
    public User user1() {
        User user = new User();
        user.setName("zhangsan");
        return user;
    }

    @Bean("user2")
    public User user2() {
        User user = new User();
        user.setName("lisi");
        return user;
    }
}
